Integrand size = 25, antiderivative size = 415 \[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=-\frac {\sqrt {e} \arctan \left (1-\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \arctan \left (1+\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)-\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}-\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)+\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}+\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (-\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right ),-1\right ) \sqrt {e \tan (c+d x)}}{a \sqrt {a-b} \sqrt {a+b} d \sqrt {\sin (c+d x)}}-\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right ),-1\right ) \sqrt {e \tan (c+d x)}}{a \sqrt {a-b} \sqrt {a+b} d \sqrt {\sin (c+d x)}} \]
[Out]
Time = 0.86 (sec) , antiderivative size = 415, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.640, Rules used = {3975, 3557, 335, 303, 1176, 631, 210, 1179, 642, 2812, 2809, 2985, 2984, 504, 1227, 551} \[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)} \operatorname {EllipticPi}\left (-\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {\cos (c+d x)+1}}\right ),-1\right )}{a d \sqrt {a-b} \sqrt {a+b} \sqrt {\sin (c+d x)}}-\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)} \operatorname {EllipticPi}\left (\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {\cos (c+d x)+1}}\right ),-1\right )}{a d \sqrt {a-b} \sqrt {a+b} \sqrt {\sin (c+d x)}}-\frac {\sqrt {e} \arctan \left (1-\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \arctan \left (\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}+1\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \log \left (\sqrt {e} \tan (c+d x)-\sqrt {2} \sqrt {e \tan (c+d x)}+\sqrt {e}\right )}{2 \sqrt {2} a d}-\frac {\sqrt {e} \log \left (\sqrt {e} \tan (c+d x)+\sqrt {2} \sqrt {e \tan (c+d x)}+\sqrt {e}\right )}{2 \sqrt {2} a d} \]
[In]
[Out]
Rule 210
Rule 303
Rule 335
Rule 504
Rule 551
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 1227
Rule 2809
Rule 2812
Rule 2984
Rule 2985
Rule 3557
Rule 3975
Rubi steps \begin{align*} \text {integral}& = \frac {\int \sqrt {e \tan (c+d x)} \, dx}{a}-\frac {b \int \frac {\sqrt {e \tan (c+d x)}}{b+a \cos (c+d x)} \, dx}{a} \\ & = \frac {e \text {Subst}\left (\int \frac {\sqrt {x}}{e^2+x^2} \, dx,x,e \tan (c+d x)\right )}{a d}-\frac {\left (b \sqrt {e \cot (c+d x)} \sqrt {e \tan (c+d x)}\right ) \int \frac {1}{(b+a \cos (c+d x)) \sqrt {e \cot (c+d x)}} \, dx}{a} \\ & = \frac {(2 e) \text {Subst}\left (\int \frac {x^2}{e^2+x^4} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{a d}-\frac {\left (b \sqrt {-\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \int \frac {\sqrt {\sin (c+d x)}}{\sqrt {-\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a \sqrt {\sin (c+d x)}} \\ & = -\frac {e \text {Subst}\left (\int \frac {e-x^2}{e^2+x^4} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{a d}+\frac {e \text {Subst}\left (\int \frac {e+x^2}{e^2+x^4} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{a d}-\frac {\left (b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \int \frac {\sqrt {\sin (c+d x)}}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a \sqrt {\sin (c+d x)}} \\ & = \frac {\sqrt {e} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}+2 x}{-e-\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}-2 x}{-e+\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}+\frac {e \text {Subst}\left (\int \frac {1}{e-\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{2 a d}+\frac {e \text {Subst}\left (\int \frac {1}{e+\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \tan (c+d x)}\right )}{2 a d}-\frac {\left (4 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \text {Subst}\left (\int \frac {x^2}{\sqrt {1-x^4} \left (a+b+(-a+b) x^4\right )} \, dx,x,\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right )}{a d \sqrt {\sin (c+d x)}} \\ & = \frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)-\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}-\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)+\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}+\frac {\sqrt {e} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}-\frac {\sqrt {e} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}-\frac {\left (2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {a+b}-\sqrt {a-b} x^2\right ) \sqrt {1-x^4}} \, dx,x,\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right )}{a \sqrt {a-b} d \sqrt {\sin (c+d x)}}+\frac {\left (2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {a+b}+\sqrt {a-b} x^2\right ) \sqrt {1-x^4}} \, dx,x,\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right )}{a \sqrt {a-b} d \sqrt {\sin (c+d x)}} \\ & = -\frac {\sqrt {e} \arctan \left (1-\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \arctan \left (1+\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)-\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}-\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)+\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}-\frac {\left (2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (\sqrt {a+b}-\sqrt {a-b} x^2\right )} \, dx,x,\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right )}{a \sqrt {a-b} d \sqrt {\sin (c+d x)}}+\frac {\left (2 \sqrt {2} b \sqrt {\cos (c+d x)} \sqrt {e \tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+x^2} \left (\sqrt {a+b}+\sqrt {a-b} x^2\right )} \, dx,x,\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right )}{a \sqrt {a-b} d \sqrt {\sin (c+d x)}} \\ & = -\frac {\sqrt {e} \arctan \left (1-\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \arctan \left (1+\frac {\sqrt {2} \sqrt {e \tan (c+d x)}}{\sqrt {e}}\right )}{\sqrt {2} a d}+\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)-\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}-\frac {\sqrt {e} \log \left (\sqrt {e}+\sqrt {e} \tan (c+d x)+\sqrt {2} \sqrt {e \tan (c+d x)}\right )}{2 \sqrt {2} a d}+\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (-\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right ),-1\right ) \sqrt {e \tan (c+d x)}}{a \sqrt {a-b} \sqrt {a+b} d \sqrt {\sin (c+d x)}}-\frac {2 \sqrt {2} b \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {\sqrt {a-b}}{\sqrt {a+b}},\arcsin \left (\frac {\sqrt {\sin (c+d x)}}{\sqrt {1+\cos (c+d x)}}\right ),-1\right ) \sqrt {e \tan (c+d x)}}{a \sqrt {a-b} \sqrt {a+b} d \sqrt {\sin (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 6 vs. order 4 in optimal.
Time = 5.98 (sec) , antiderivative size = 646, normalized size of antiderivative = 1.56 \[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=-\frac {\cos (c+d x) \left (a+b \sqrt {\sec ^2(c+d x)}\right ) \sqrt {e \tan (c+d x)} \left (6 \sqrt {2} \left (a^2-b^2\right ) \arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )-6 \sqrt {2} a^2 \arctan \left (1+\sqrt {2} \sqrt {\tan (c+d x)}\right )+6 \sqrt {2} b^2 \arctan \left (1+\sqrt {2} \sqrt {\tan (c+d x)}\right )-(6+6 i) \sqrt {b} \left (a^2-b^2\right )^{3/4} \arctan \left (1-\frac {(1+i) \sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt [4]{a^2-b^2}}\right )+(6+6 i) \sqrt {b} \left (a^2-b^2\right )^{3/4} \arctan \left (1+\frac {(1+i) \sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt [4]{a^2-b^2}}\right )-3 \sqrt {2} a^2 \log \left (1-\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )+3 \sqrt {2} b^2 \log \left (1-\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )+3 \sqrt {2} a^2 \log \left (1+\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )-3 \sqrt {2} b^2 \log \left (1+\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )+(3+3 i) \sqrt {b} \left (a^2-b^2\right )^{3/4} \log \left (\sqrt {a^2-b^2}-(1+i) \sqrt {b} \sqrt [4]{a^2-b^2} \sqrt {\tan (c+d x)}+i b \tan (c+d x)\right )-(3+3 i) \sqrt {b} \left (a^2-b^2\right )^{3/4} \log \left (\sqrt {a^2-b^2}+(1+i) \sqrt {b} \sqrt [4]{a^2-b^2} \sqrt {\tan (c+d x)}+i b \tan (c+d x)\right )+8 a b \operatorname {AppellF1}\left (\frac {3}{4},\frac {1}{2},1,\frac {7}{4},-\tan ^2(c+d x),\frac {b^2 \tan ^2(c+d x)}{a^2-b^2}\right ) \tan ^{\frac {3}{2}}(c+d x)\right )}{12 a \left (a^2-b^2\right ) d (b+a \cos (c+d x)) \sqrt {\tan (c+d x)}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 819 vs. \(2 (328 ) = 656\).
Time = 2.54 (sec) , antiderivative size = 820, normalized size of antiderivative = 1.98
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\int \frac {\sqrt {e \tan {\left (c + d x \right )}}}{a + b \sec {\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\int { \frac {\sqrt {e \tan \left (d x + c\right )}}{b \sec \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\int { \frac {\sqrt {e \tan \left (d x + c\right )}}{b \sec \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {e \tan (c+d x)}}{a+b \sec (c+d x)} \, dx=\int \frac {\cos \left (c+d\,x\right )\,\sqrt {e\,\mathrm {tan}\left (c+d\,x\right )}}{b+a\,\cos \left (c+d\,x\right )} \,d x \]
[In]
[Out]